package com.sdyeda.dtu.fx;

import java.io.IOException;

import com.sdyeda.dtu.DtuServerApplication;

import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;

public class MainWindow {

	private Scene scene;

	public MainWindow() {
		FXMLLoader loader = new FXMLLoader(getClass().getResource("MainWindow.fxml"));
		//loader.load();
		try {
			scene = new Scene(loader.load());
			//Setting.Set(Setting.MAINWINDOW_CONTROLLER, loader.getController());
			
			DtuServerApplication.primarystage.setScene(scene);
			DtuServerApplication.primarystage.setTitle("尾矿库DTU数据自动采集系统");
			DtuServerApplication.primarystage.getIcons().add(new Image(MainWindow.class.getResourceAsStream("/logo.png")));
			//System.out.println(scene);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
